var provinceArr=['浙江省','江苏省','上海市'];
var cityArr=[
        ['杭州市','宁波市','温州市','绍兴市'],
        ['南京市','苏州市','无锡市','扬州市'],
        ['黄浦区','静安区','浦东区','长宁区']
        ];
        
var province=document.getElementById('province');
var city=document.getElementById('city');

for(var i in provinceArr){
	var op=new Option(provinceArr[i],i);
	province.options.add(op);
}
province.onchange=function(){
	  city.length=0;
	  var sel=province.value;
	/*  cityArr[sel]=province.value;*/
	  for(var j in cityArr[sel]){
	  var op=new Option(cityArr[sel][j],j);
	  city.options.add(op);
}
}
 